document.documentElement.style.fontSize = innerWidth / 7.5 + 'px';
window.onresize = function() {
	document.documentElement.style.fontSize = innerWidth / 7.5 + 'px';
}

$(".pop_closs").click(function() {
	lxbBarHide(); //关闭
})

$(".pop_show").click(function() {
	lxbBarShow(); //打开
});

function lxbBarShow() {
	$(".pop").animate({
		right: '0'
	}, 500);
	$(".pop_show").hide();
	$(".pop_closs").show();
}

function lxbBarHide() {
	$(".pop").animate({
		right: '-67.5%'
	}, 500);
	$(".pop_show").show();
	$(".pop_closs").hide();
}
$(".pop_btn").click(function() {
	var tel = $("input[name='pop_tel']").val();
	var domain1 = document.URL;
	if ((/^1[3456789]\d{9}$/.test(tel))) {
		$.ajax({
			url: "http://laodongwuyou.com/lands/index/add_lands",
			type: "post",
			data: {
				"nick": "",
				"phone": tel,
				'url': domain1
			},
			success: function(res) {
				$(".bg").css("display", "block");
				$(".tc_sue_box").css("display", "block");
				$(".tc_phone").html(tel);
				lxbBarHide(); //关闭
			},
			error: function(res) {
				console.log(res);
			}
		})
	} else {
		layer.msg("请检查您的电话号码！",{time: 1600});
	}
})

// wxzx
function show_wx() {
	$(".bg").css("display", "block");
	$(".tc_wx_box").css("display", "block");
	lxbBarHide(); //关闭
}
$(".layer_btn").click(function() {
	show_wx();
})
// close
function close_show() {
	$(".bg").css("display", "none");
	$(".tc_box").css("display", "none");
	lxbBarShow(); //打开
}

//copy
function copywx() {
	const range = document.createRange();
	range.selectNode(document.getElementById('copy_content'));
	const selection = window.getSelection();
	if (selection.rangeCount > 0) selection.removeAllRanges();
	selection.addRange(range);
	document.execCommand('copy');
	token(1);
	window.location.href = "weixin://";

}

function token(e) {
	var url = document.URL;
	var address = '武汉';
	$.post("http://laodongwuyou.com/lands/index/statistics", {
		type: e,
		url: url,
		address: address
	}, function(data) {}, "json");
}

function reloads() {
	window.location.reload();
}


$("input").focus(function(){
	$(".foot").css("display","none");
})

$("input").blur(function(){
	$(".foot").css("display","flex");
})

